﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using TrainingWorkshop.IDAL;
using TrainingWorkshop.DAL_EF.Translator;

namespace TrainingWorkshop.DAL_EF
{
    public class LevelRepository_EF : ILevelRepository
    {
        /// <summary>
        /// get all Level from table Teacher in database
        /// </summary>
        /// <returns>list of teacher</returns>
        public List<Model.Level> SelectAll()
        {
            List<Level> temp = new List<Level>();
            using (var db = new projectbEntities())
            {
                var qurey = from l in db.Levels
                            select l;
                temp = qurey.ToList();

            }
           
            return LevelTranslator.EFToModelLevel(temp);
        }
     
    }
}
